package com.wjjm.spoonselling.dao;

import com.wjjm.spoonselling.pojo.Comment;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CommentDao {

    @Select("select * from comment where commodityId=#{commodityId}")
    List<Comment> selectAll(int commodityId);

    @Insert("insert into comment values(#{commodityId},#{customerId},#{name},#{content})")
    Boolean insert(Comment comment);
}
